package com.aididi.java8;

import java.util.ArrayList;
import java.util.stream.Collectors;

/**
 * @Auther: xuzexiang
 * @Date: 2018-11-20 0020 16:49
 * @Description:
 */
public class StreamDemo2 {
    private static int n;

    public static void main(String[] args) {
        String a = "aabig";
        String b = a.replace("a","b");
        System.out.println(a);
        System.out.println(b);
        ArrayList<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        System.out.println(1^2);
        System.out.println(list.stream().map(x -> x*2).filter(num -> num>20 ).collect(Collectors.toList()));
    }
}
